//
// Nibbler.hpp for Nibbler in /home/titouan/Dropbox/Code/nibbler-epitech-2017/src
//
// Made by Titouan Creach
// Login   <titouan@epitech.net>
//
// Started on  Sat Mar 22 17:56:51 2014 Titouan Creach
// Last update Mon Mar 24 14:13:32 2014 Titouan Creach
//

#ifndef NIBBLER_HPP
#define NIBBLER_HPP

#include <iostream>
#include "Pomme.hpp"
#include "IGraph.hpp"
#include "Snake.hpp"

class Nibbler
{
public:

  Nibbler(IGraph *g, int w, int h);
  void run();
  void displaySnake();
  void displayPomme();
  void collisionSnakePomme();
  void displayBordure();
  bool collisionSnakeSnake();
  bool collisionSnakeBordure();
  const std::string getScoreAsString() const;
  void screenScore() const;

private:

  IGraph::Event				_e;
  IGraph				*_g;
  std::map<IGraph::Image, std::string>	_loadMap;
  Snake					_snake;
  Pomme					_pomme;
  int					_w;
  int					_h;
  unsigned int _time;

};



#endif
